package day17.zhiyou100;

import java.io.*;

// 字符流转换成字节流
public class Demo04_OutputStreamWriter {

    public static void main(String[] args) throws Exception {
        File file = new File("D:\\aa\\bb\\ww.txt");
        // 字符输出流对象
        //FileWriter fw = new  FileWriter(file);
        FileOutputStream fos = new FileOutputStream(file,true);
        // 转别转换输出流
        OutputStreamWriter osw = new OutputStreamWriter(fos,"gbk");
        osw.write("我们正在学习转换流");
        osw.flush();
        osw.close();

    }

}
